package com.cisystem.system.service.impl;

import java.util.List;
import com.cisystem.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cisystem.system.mapper.SysMailLogMapper;
import com.cisystem.system.domain.SysMailLog;
import com.cisystem.system.service.ISysMailLogService;

/**
 * 邮件日志Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-25
 */
@Service
public class SysMailLogServiceImpl implements ISysMailLogService
{
    @Autowired
    private SysMailLogMapper sysMailLogMapper;



    /**
     * 查询邮件日志
     *
     * @param id 邮件日志主键
     * @return 邮件日志
     */
    @Override
    public SysMailLog selectSysMailLogById(Long id)
    {
        return sysMailLogMapper.selectSysMailLogById(id);
    }

    /**
     * 查询邮件日志列表
     *
     * @param sysMailLog 邮件日志
     * @return 邮件日志
     */
    @Override
    public List<SysMailLog> selectSysMailLogList(SysMailLog sysMailLog)
    {
        List<SysMailLog> sysMailLogs = sysMailLogMapper.selectSysMailLogList(sysMailLog);
        return sysMailLogs;
    }

    /**
     * 新增邮件日志
     *
     * @param sysMailLog 邮件日志
     * @return 结果
     */
    @Override
    public int insertSysMailLog(SysMailLog sysMailLog)
    {
        sysMailLog.setCreateTime(DateUtils.getNowDate());
        return sysMailLogMapper.insertSysMailLog(sysMailLog);
    }

    /**
     * 修改邮件日志
     *
     * @param sysMailLog 邮件日志
     * @return 结果
     */
    @Override
    public int updateSysMailLog(SysMailLog sysMailLog)
    {
        sysMailLog.setUpdateTime(DateUtils.getNowDate());
        return sysMailLogMapper.updateSysMailLog(sysMailLog);
    }

    /**
     * 批量删除邮件日志
     *
     * @param ids 需要删除的邮件日志主键
     * @return 结果
     */
    @Override
    public int deleteSysMailLogByIds(Long[] ids)
    {
        return sysMailLogMapper.deleteSysMailLogByIds(ids);
    }

    /**
     * 删除邮件日志信息
     *
     * @param id 邮件日志主键
     * @return 结果
     */
    @Override
    public int deleteSysMailLogById(Long id)
    {
        return sysMailLogMapper.deleteSysMailLogById(id);
    }
}